package cn.universal.plugins.protocolapi.core.servlet;

import java.io.IOException;
import java.io.InputStream;
import java.security.Principal;
import java.util.Enumeration;
import org.springframework.http.HttpInputMessage;
import org.springframework.web.multipart.MultipartRequest;

public interface MagicHttpServletRequest {

  String getHeader(String name);

  Enumeration<String> getHeaders(String name);

  String getRequestURI();

  String getMethod();

  void setAttribute(String key, Object value);

  String[] getParameterValues(String name);

  Object getAttribute(String name);

  HttpInputMessage getHttpInputMessage();

  String getContentType();

  MagicHttpSession getSession();

  MagicCookie[] getCookies();

  InputStream getInputStream() throws IOException;

  boolean isMultipart();

  String getRemoteAddr();

  MultipartRequest resolveMultipart();

  Principal getUserPrincipal();

  <T> T getRequest();
}
